<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  		 			    	 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
    	<groupId>${project.package}</groupId>
    	<artifactId>${project.name}-parent</artifactId>
    	<version>0.0.1</version>
  	</parent>
	<groupId>${project.package}</groupId>
	<artifactId>${project.name}-core</artifactId>
	<version>0.0.1</version>
	<name>${project.name}-core</name>
	<description>${project.name}-core</description>
	<url>http://</url>
	<packaging>jar</packaging>

	<build>
		<directory>target</directory>
		<outputDirectory>target/classes</outputDirectory>
		<testOutputDirectory>target/test-classes</testOutputDirectory>
		
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<compilerVersion>1.6</compilerVersion>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>aspectj-maven-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<id>compile</id>
						<phase>compile</phase>
						<configuration>
							<source>1.6</source>
							<target>1.6</target>
							<verbose>false</verbose>
							<outxml>true</outxml>
							<aspectLibraries>
								<aspectLibrary>
									<groupId>org.springframework</groupId>
									<artifactId>spring-aspects</artifactId>
								</aspectLibrary>
							</aspectLibraries>
						</configuration>
						<goals>
							<goal>compile</goal>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjtools</artifactId>
						<version>1.6.4</version>
					</dependency>
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjweaver</artifactId>
						<version>1.6.4</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/java</source>
								<source>src/main/resources</source>
							</sources>
						</configuration>
					</execution>
					<execution>
						<id>add-test-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/java</source>
								<source>src/test/resources</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
		    	<groupId>org.apache.maven.plugins</groupId>
		    	<artifactId>maven-surefire-plugin</artifactId>
		    	<configuration>
		        	<testFailureIgnore>true</testFailureIgnore>
		     	</configuration>
		    </plugin>
		</plugins>
		
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<excludes>
					<exclude>**/*Context.xml</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<includes>
					<include>**/*Context.xml</include>
				</includes>
			</resource>
		</resources>
	</build>
	
	<profiles>
		<profile>
			<activation>
				<property>
					<name>project</name>
					<value>refresh</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
					   	<executions>
					    	<execution>
					    		<id>create-directories</id>
					        	<phase>clean</phase>
					            <configuration>
					            	<tasks>
										<mkdir dir="src/main/java" />
										<mkdir dir="src/main/resources" />
										<mkdir dir="src/test/java" />
										<mkdir dir="src/test/resources" />
					              	</tasks>
					            </configuration>
					        	<goals>
					            	<goal>run</goal>
					            </goals>
					    	</execution>
					    </executions>
					</plugin>
														
					<plugin>
		          		<groupId>org.apache.maven.plugins</groupId>
		          		<artifactId>maven-eclipse-plugin</artifactId>
		          		<version>2.5.1</version>
					   	<executions>
					    	<execution>
					        	<phase>clean</phase>
					        	<configuration>
					        		<workspace>../</workspace>
									<!-- <downloadSources>true</downloadSources>
          							<downloadJavadocs>true</downloadJavadocs> -->
									<projectnatures>
										<projectnature>org.eclipse.jdt.core.javanature</projectnature>
										<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
									</projectnatures>
									<buildcommands>
										<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
										<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
									</buildcommands>
					        	</configuration>
					        	<goals>
					            	<goal>configure-workspace</goal>
					            	<goal>clean</goal>
					            	<goal>eclipse</goal>
					            </goals>
					    	</execution>
						</executions>
		        	</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>